package com.bnyy.message.bean.chat.message_data;

import com.bnyy.message.enums.MessageType;
import com.google.gson.JsonObject;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2022/12/6
 **/
@Table(name = "message_notice_location_authority")
public class NoticeLocationAuthorityMessage extends MessageData {

    interface ColumnName {
        String TITLE = "title";
        String CONTENT = "content";
        String WEAR_ID = "wear_id";
        String IMEI = "imei";
        String USER_ID = "user_id";
    }
    @Column(name = ColumnName.TITLE)
    private String title;
    @Column(name = ColumnName.CONTENT)
    private String content;
    @Column(name = ColumnName.WEAR_ID)
    private int wear_id;
    @Column(name = ColumnName.IMEI)
    private String imei;
    @Column(name = ColumnName.USER_ID)
    private int user_id;

    public NoticeLocationAuthorityMessage() {
    }

    public NoticeLocationAuthorityMessage(String msgId, JsonObject jsonObject) {
        super(msgId, jsonObject);
        this.title = jsonObject.get(ColumnName.TITLE).getAsString();
        this.content = jsonObject.get(ColumnName.CONTENT).getAsString();
        this.wear_id = jsonObject.get(ColumnName.WEAR_ID).getAsInt();
        this.imei = jsonObject.get(ColumnName.IMEI).getAsString();
        this.user_id = jsonObject.get(ColumnName.USER_ID).getAsInt();
    }

    @Override
    public MessageType getMessageType() {
        return MessageType.NOTICE_LOCATION_AUTHORITY;
    }

    public String getContent() {
        return content;
    }

    public int getWear_id() {
        return wear_id;
    }

    public String getImei() {
        return imei;
    }

    public int getUser_id() {
        return user_id;
    }

    public String getTitle() {
        return title;
    }
}

